/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 * No deletion without permission, or be held responsible to law.
 * @author Cheng
 */
import { defHttp } from '/@/utils/http/axios';
import { useGlobSetting } from '/@/hooks/setting';
import { BasicModel, Page } from '/@/api/model/baseModel';

const { adminPath } = useGlobSetting();

export interface InEquipmentType extends BasicModel<InEquipmentType> {
  equipmentName?: string; // 设备类型名称
  equipmentCode?: string; // 设备类型编码
  isvideo?: string; // 维保期间是否需要拍摄视频 01 是 10 否
  islinked?: string; // 是否联动设备 01 是 10 否
  cycle?: string; // 维保周期 01 年 10 季 20 月
  inspectPercent?: number; // 监督检查设备百分比
  jcPercent?: number; // 监测设备百分比
  deleted?: string; // 删除标识
}

export const inEquipmentTypeList = (params?: InEquipmentType | any) =>
  defHttp.get<InEquipmentType>({ url: adminPath + '/device/management/inEquipmentType/list', params });

export const inEquipmentTypeListData = (params?: InEquipmentType | any) =>
  defHttp.post<Page<InEquipmentType>>({ url: adminPath + '/device/management/inEquipmentType/listData', params });

export const inEquipmentTypeForm = (params?: InEquipmentType | any) =>
  defHttp.get<InEquipmentType>({ url: adminPath + '/device/management/inEquipmentType/form', params });

export const inEquipmentTypeSave = (params?: any, data?: InEquipmentType | any) =>
  defHttp.postJson<InEquipmentType>({ url: adminPath + '/device/management/inEquipmentType/save', params, data });

export const inEquipmentTypeDelete = (params?: InEquipmentType | any) =>
  defHttp.get<InEquipmentType>({ url: adminPath + '/device/management/inEquipmentType/delete', params });
